package com.itheima.filter;

import jakarta.servlet.*;

import java.io.IOException;

//@WebFilter(urlPatterns="/*")
public class XbcFilter implements Filter {

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("Xbc 拦截到了请求... 放行前逻辑");
        //执行过滤器链
        filterChain.doFilter(servletRequest, servletResponse);
        //执行完毕后输出日志
        System.out.println("Xbc 拦截到了请求... 放行后逻辑");
    }
}
